﻿<ResourceDictionary 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:DeepEarth.Client.MapControl="clr-namespace:DeepEarth.Client.MapControl;assembly=DeepEarth.Client.MapControl" 
    xmlns:DeepControls="clr-namespace:DeepEarth.Client.MapControl.Controls;assembly=DeepEarth.Client.MapControl"
    xmlns:DeepShapes="clr-namespace:DeepEarth.Client.MapControl.Geometry;assembly=DeepEarth.Client.MapControl"
    xmlns:DeepLayers="clr-namespace:DeepEarth.Client.MapControl.Layers;assembly=DeepEarth.Client.MapControl"
	xmlns:DeepGeometryTools="clr-namespace:DeepEarth.Client.MapControl.Controls.GeometryTools;assembly=DeepEarth.Client.MapControl"
	mc:Ignorable="d">

    <!-- DataTemplate EndPath -->
    <DataTemplate x:Name="EndPath" x:Key="EndPath">
        <Grid>
            <Path Stretch="Fill" StrokeThickness="1" StrokeLineJoin="Miter" Stroke="#FF000000" Data="F1 M700.58099,321.34064 C734.69,354.68164 733.41199,418.2294 699.23602,456.89941 L722.51898,456.89941 C732.60602,457.06741 744.37299,455.55441 744.36603,442.09241 C744.71002,434.03641 744.67798,355.97162 744.71002,338.82364 C744.54199,323.69363 732.77399,321.16684 722.18298,321.16684 C714.17798,321.16684 713.60901,321.34064 700.58099,321.34064 z" Width="14.616" Opacity="1" RenderTransformOrigin="0.5,0.5">
                <Path.Fill>
                    <LinearGradientBrush  EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF242424"/>
                        <GradientStop Color="#FF313131" Offset="1"/>
                        <GradientStop Color="#FF080808" Offset="0.55800002813339233"/>
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
        </Grid>
    </DataTemplate>

    <!-- Brush Slider -->
    <LinearGradientBrush x:Name="SliderBrush" x:Key="SliderBrush" EndPoint="0.699999988079071,1" StartPoint="0.699999988079071,0">
        <GradientStop Color="#C6272727"/>
        <GradientStop Color="#C66A6A6A" Offset="0.375"/>
        <GradientStop Color="#C66A6A6A" Offset="0.625"/>
        <GradientStop Color="#C6272727" Offset="1"/>
    </LinearGradientBrush>

    <!--Style Map-->
    <Style TargetType="DeepEarth.Client.MapControl:Map">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepEarth.Client.MapControl:Map">
                    <Grid>
                        <Grid x:Name="PART_LayoutRoot">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid x:Name="PART_MapContent" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <RotateTransform x:Name="PART_MapRotation" />
                                </Grid.RenderTransform>
                                <DeepControls:MouseControl x:Name="PART_MouseControl"/>
                                <DeepGeometryTools:DrawControl x:Name="PART_DrawControl" DrawLineColor="#FFEFFF00" DrawFillColor="#7FFF3B00" DrawLineThickness="3" DrawOpacity="1.0" />
                                <Grid x:Name="PART_MapLayers" />
                            </Grid>
                            <StackPanel x:Name="PART_LicenseContainer" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Style PointBase -->
    <Style TargetType="DeepShapes:PointBase">
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
        <Setter Property="AnchorPoint" Value="0.5,0.5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepShapes:PointBase">
                    <Grid Height="20" Width="20">
                        <Grid.RenderTransform>
                            <ScaleTransform x:Name="_ScaleTransform" />
                        </Grid.RenderTransform>
                        <Ellipse Height="20" Width="20" Fill="Red" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Style GeometryBase -->
    <Style TargetType="DeepShapes:GeometryBase">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepShapes:GeometryBase">
                    <Canvas>
                        <Path x:Name="path"/>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Style MouseControl -->
    <Style TargetType="DeepControls:MouseControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepControls:MouseControl">
                    <Canvas>
                        <Rectangle x:Name="PART_PixelBox"
                                   Fill="#3E1157DC" 
                                   Stroke="#FF0781F7" 
                                   StrokeDashArray="20, 8" 
                                   StrokeEndLineCap="Round" 
                                   StrokeDashCap="Round" 
                                   StrokeThickness="1.5" 
								   RadiusY="8" RadiusX="8"/>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Style ZoomSliderControl -->
    <Style TargetType="DeepControls:ZoomSliderControl">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Maximum" Value="10"/>
        <Setter Property="Minimum" Value="0"/>
        <Setter Property="Value" Value="0"/>
        <Setter Property="LargeChange" Value="0.25"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepControls:ZoomSliderControl">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <ControlTemplate x:Key="RepeatButtonTemplate">
                                <Grid x:Name="Root" Opacity="0" Background="Transparent"/>
                            </ControlTemplate>
                        </Grid.Resources>
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates">
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="00:00:00.3000000"/>
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="Normal">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Root" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Root" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.82"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="HorizontalTrackRectangleDisabledOverlay" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ThumbDisabledOverlay" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="VerticalTrackRectangleDisabledOverlay" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Grid x:Name="HorizontalTemplate" Background="{TemplateBinding Background}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle x:Name="TrackRectangle" Height="8" Margin="5,0,5,0" Grid.Column="0" Grid.ColumnSpan="3" StrokeThickness="{TemplateBinding BorderThickness}" RadiusX="4" RadiusY="4" Fill="{StaticResource SliderBrush}"/>
                            <Rectangle x:Name="HorizontalTrackRectangleDisabledOverlay" Height="3" Margin="5,0,5,0" Opacity=".55" Visibility="Collapsed" Grid.Column="0" Grid.ColumnSpan="3" Fill="White" RadiusX="1" RadiusY="1"/>
                            <RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" ClickMode="Press" Grid.Column="0" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}"/>
                            <Thumb x:Name="HorizontalThumb" Height="18" Width="11" Grid.Column="1" IsTabStop="True" >
                                <Thumb.Style>
                                    <Style TargetType="Thumb">
                                        <Setter Property="Background" Value="#FF1F3B53"/>
                                        <Setter Property="BorderThickness" Value="1"/>
                                        <Setter Property="IsTabStop" Value="False"/>
                                        <Setter Property="BorderBrush">
                                            <Setter.Value>
                                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                                    <GradientStop Color="#FF718597" Offset="0.375"/>
                                                    <GradientStop Color="#FF617584" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Setter.Value>
                                        </Setter>
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="Thumb">
                                                    <Grid>
                                                        <vsm:VisualStateManager.VisualStateGroups>
                                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                                <vsm:VisualState x:Name="Normal"/>
                                                                <vsm:VisualState x:Name="MouseOver">
                                                                    <Storyboard>
                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </vsm:VisualState>
                                                                <vsm:VisualState x:Name="Pressed">
                                                                    <Storyboard>
                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </vsm:VisualState>
                                                                <vsm:VisualState x:Name="Disabled">
                                                                    <Storyboard>
                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                                                            <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </vsm:VisualState>
                                                            </vsm:VisualStateGroup>
                                                            <vsm:VisualStateGroup x:Name="FocusStates">
                                                                <vsm:VisualState x:Name="Focused">
                                                                    <Storyboard>
                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                        <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                                                            <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF413E3E"/>
                                                                        </ColorAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </vsm:VisualState>
                                                                <vsm:VisualState x:Name="Unfocused">
                                                                    <Storyboard>
                                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.StrokeThickness)">
                                                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                        </DoubleAnimationUsingKeyFrames>
                                                                    </Storyboard>
                                                                </vsm:VisualState>
                                                            </vsm:VisualStateGroup>
                                                        </vsm:VisualStateManager.VisualStateGroups>
                                                        <Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" BorderBrush="#FF020202">
                                                            <Grid Margin="1">
                                                                <Border x:Name="BackgroundAnimation" Opacity="0" Background="#FF66696C"/>
                                                                <Rectangle x:Name="BackgroundGradient">
                                                                    <Rectangle.Fill>
                                                                        <LinearGradientBrush EndPoint="0.699999988079071,1" StartPoint="0.699999988079071,0">
                                                                            <GradientStop Color="#C6272727"/>
                                                                            <GradientStop Color="#C66A6A6A" Offset="0.375"/>
                                                                            <GradientStop Color="#C66A6A6A" Offset="0.625"/>
                                                                            <GradientStop Color="#C6272727" Offset="1"/>
                                                                        </LinearGradientBrush>
                                                                    </Rectangle.Fill>
                                                                </Rectangle>
                                                            </Grid>
                                                        </Border>
                                                        <Rectangle x:Name="DisabledVisualElement" IsHitTestVisible="false" Opacity="0" Fill="#FFFFFFFF" RadiusX="2" RadiusY="2"/>
                                                        <Rectangle Margin="1" x:Name="FocusVisualElement" IsHitTestVisible="false" Opacity="0" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                                    </Grid>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Thumb.Style>
                            </Thumb>
                            <Rectangle x:Name="ThumbDisabledOverlay" Width="11" Opacity=".55" Visibility="Collapsed" Grid.Column="1" Fill="White" RadiusX="2" RadiusY="2"/>
                            <RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" ClickMode="Press" Grid.Column="2" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}"/>
                        </Grid>
                        <Grid x:Name="VerticalTemplate" Visibility="Collapsed" Background="{TemplateBinding Background}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Rectangle Margin="0,5,0,5" Width="3" Grid.Row="0" Grid.RowSpan="3" Fill="#FFE6EFF7" Stroke="#FFA3AEB9" StrokeThickness="{TemplateBinding BorderThickness}" RadiusX="1" RadiusY="1"/>
                            <Rectangle x:Name="VerticalTrackRectangleDisabledOverlay" Margin="0,5,0,5" Width="3" Opacity=".55" Visibility="Collapsed" Grid.Row="0" Grid.RowSpan="3" Fill="White" RadiusX="1" RadiusY="1"/>
                            <RepeatButton x:Name="VerticalTrackLargeChangeDecreaseRepeatButton" ClickMode="Press" Grid.Row="2" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}"/>
                            <Thumb x:Name="VerticalThumb" Height="11" Width="18" Grid.Row="1" IsTabStop="True"/>
                            <RepeatButton x:Name="VerticalTrackLargeChangeIncreaseRepeatButton" ClickMode="Press" Grid.Row="0" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}"/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Style DrawControl -->
    <Style TargetType="DeepGeometryTools:DrawControl">
        <Setter Property="MinWidth" Value="200"/>
        <Setter Property="MinHeight" Value="200"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepGeometryTools:DrawControl">
                    <Grid x:Name="PART_DrawControl">
                        <Grid x:Name="PART_DrawControlLayers"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Style DrawPoint -->
    <Style TargetType="DeepGeometryTools:DrawPoint">
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
        <Setter Property="AnchorPoint" Value="0.5,0.5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepGeometryTools:DrawPoint">
                    <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Width="10" Height="10">
                        <Grid.RenderTransform>
                            <ScaleTransform x:Name="_ScaleTransform"/>
                        </Grid.RenderTransform>
                        <Ellipse Fill="#FFFDFF00" Stroke="#FF000000"/>
                        <Ellipse Fill="#FFFDFF00" Stroke="#FF000000" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center" Width="5" Height="5">
                            <Ellipse.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform X="-0.5" Y="-0.5"/>
                                </TransformGroup>
                            </Ellipse.RenderTransform>
                        </Ellipse>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Style PinPoint -->
    <Style TargetType="DeepGeometryTools:DrawPinPoint">
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
        <Setter Property="AnchorPoint" Value="0.5,0.5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepGeometryTools:DrawPinPoint">
                    <Grid Width="30" Height="30">
                        <Grid.RenderTransform>
                            <ScaleTransform x:Name="_ScaleTransform"/>
                        </Grid.RenderTransform>
                    	<Image x:Name="PART_PinImage" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="30" Height="30" Source="public.png" Stretch="Fill" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Style DrawPolygon -->
    <Style TargetType="DeepGeometryTools:DrawPolygon">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepGeometryTools:DrawPolygon">
                    <Canvas>
                        <Path x:Name="path"/>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Style DrawLineString -->
    <Style TargetType="DeepGeometryTools:DrawLineString">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepGeometryTools:DrawLineString">
                    <Canvas>
                        <Path x:Name="path" />
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>